Skip to content

fix(core): P0a trust correctness (H13/H5/H3) for #8 - #9

Merged
karutoil merged 1 commit into
masterfrom
pullfrog/8-p0a-h13-h5-h3
Aug 8, 2026
Merged

fix(core): P0a trust correctness (H13/H5/H3) for #8#9
karutoil merged 1 commit into
masterfrom
pullfrog/8-p0a-h13-h5-h3

Conversation

@pullfrog

@pullfrog pullfrog Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor

Summary

Implements Milestone 1 / P0a from the Agent OS roadmap on #8: correctness fixes that unblock safe multi-agent work.

H13 — Cancel must not promote worktrees

  • Abort/cancel paths in subagent.rs (loop start, mid-batch tools, approval aborted, chain steps) now return Outcome::err instead of Outcome::ok("[… aborted]").
  • Single and parallel worktree promote gates require outcome.ok && !cancel so half-done trees never merge into main.

H5 — No silent empty writes

  • write_file and each bulk_write entry require a present string content key.
  • Explicit "" still allowed when the key exists; missing key leaves existing files unchanged.

H3 — Bound streamed tool-call growth

  • Cap tool-call index / slot count at 64 and total args bytes at 8 MiB (providers/streaming.rs helpers).
  • Wired on OpenAI, Anthropic, Codex, and Gemini stream paths; cap overflows are not retried.

Test plan

  • cargo test --locked --no-default-features -- write_file_missing_content write_file_explicit_empty bulk_write_missing_content cancelled_subagent_outcome promote_gate_requires ensure_stream_tool_slot_rejects append_stream_tool_args_caps stream_tool_slot_helpers
  • CI full suite with microsandbox (libcap-ng-dev) on PR

Closes part of #8 (P0a slice).

Pullfrog  | View workflow run | via Pullfrog | Using openai-compatible/ck-grok-4.5𝕏

…tream caps

Close Agent OS roadmap P0a items from #8:

- H13: cancelled subagent/chain abort paths return non-ok; never promote
  worktrees unless outcome.ok and the cancel token is clear (single + parallel).
- H5: write_file and bulk_write require a present string `content` key
  (explicit empty string still allowed); missing key leaves existing files.
- H3: bound streamed tool-call index (<64) and total args bytes (8 MiB) on
  OpenAI, Anthropic, Codex, and Gemini stream paths; do not retry cap overflows.
@pullfrog

pullfrog Bot commented Aug 7, 2026

Copy link
Copy Markdown
Contributor Author

No fix pushed — the three failing checks are pre-existing on master, not introduced by PR #9.

PR #9 only changes core/src/{provider,subagent,tools}.rs and core/src/providers/streaming.rs. Diff vs origin/master is empty for every path CI complained about:

Job Failure On PR?
core (rust) cargo fmt --check in message.rs / openai_compatible.rs identical to master
tui (go) gofmt -lblocks.go identical to master
web (next) protocol schema: SDK missing advisor_note, advisor_status advisor/SDK/schema unchanged by this PR

Fixing them here would be out-of-scope noise on a P0a trust PR; they need a separate master-side hygiene PR (rustfmt/gofmt + add the two events to sdk/src/core-events.ts / schema / fixtures).

Task list (1/3 completed)
  • Verify CI failures are PR-introduced vs pre-existing on master
  • Fix rustfmt / gofmt / protocol schema as appropriate
  • Re-run exact CI commands, commit, push

Pullfrog  | View workflow run | via Pullfrog | Using openai-compatible/ck-grok-4.5𝕏

@karutoil
karutoil merged commit 3fca6b5 into master Aug 8, 2026
6 of 9 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant